<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>带有提示和点击切换的深蓝色弹框</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        .popup {
            width: 300px;
            border: 1px solid #002244; /* 深蓝色边框 */
            padding: 20px;
            background-color: #003366; /* 深蓝色背景 */
            color: #ffffff; /* 白色文字 */
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .tabs {
            display: flex;
            margin-bottom: 20px;
        }

        .tab-btn {
            padding: 10px 20px;
            border: 2px solid #00509e; /* 蓝色边框 */
            cursor: pointer;
            margin-right: 10px;
            background-color: #00509e; /* 蓝色背景 */
            color: #ffffff; /* 白色文字 */
            border-radius: 4px;
            transition: background-color 0.3s, transform 0.3s;
            position: relative; /* 为提示框做准备 */
        }

        .tab-btn.active {
            background-color: #007bff; /* 更亮的蓝色背景 */
            border-color: #007bff; /* 更亮的蓝色边框 */
        }

        .tab-btn:hover {
            background-color: #0069d9; /* 悬停时的蓝色背景 */
            border-color: #0069d9; /* 悬停时的蓝色边框 */
            transform: scale(1.05); /* 悬停时稍微放大 */
        }

        .contents {
            display: flex;
            flex-direction: column;
        }

        .content {
            display: none;
            color: #ffffff;
        }

        .content.active {
            display: block;
        }

        /* 提示框样式 */
        .tab-btn:hover::after {
            content: attr(title);
            position: absolute;
            top: 120%;
            left: 50%;
            transform: translateX(-50%);
            background-color: #333;
            color: #fff;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 12px;
            white-space: nowrap;
            z-index: 1;
        }
    </style>
</head>
<body>
    <div class="popup">
        <div class="tabs">
            <button class="tab-btn" data-target="#content1" title="点击切换到内容1">标签1</button>
            <button class="tab-btn" data-target="#content2" title="点击切换到内容2">标签2</button>
            <button class="tab-btn" data-target="#content3" title="点击切换到内容3">标签3</button>
        </div>
        <div class="contents">
            <div id="content1" class="content active">内容1：带有提示和点击切换的深蓝色弹框。</div>
            <div id="content2" class="content">内容2：这是第二个标签的内容。</div>
            <div id="content3" class="content">内容3：这是第三个标签的内容。</div>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const tabs = document.querySelectorAll('.tab-btn');
            const contents = document.querySelectorAll('.content');

            tabs.forEach(tab => {
                tab.addEventListener('click', function() {
                    const target = document.querySelector(tab.dataset.target);

                    tabs.forEach(t => t.classList.remove('active'));
                    contents.forEach(c => c.classList.remove('active'));

                    tab.classList.add('active');
                    target.classList.add('active');
                });
            });
        });
    </script>
</body>
</html>